class Record {
    constructor() {
        this.record = Bmob.Query('record')
    }
    add(question,answer) {
        if (question) {
            this.record.set('question',question);
        }
        this.record.set('answer',answer);
        return this.record.save();
    }
    getByObjectId(oId) {
        return this.record.get(oId);
    }
    update(id,answer) {
        this.record.set('id',id);
        return this.add('',answer);
    }
    getAll() {
        return this.record.find();
    }
}
